define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";

	var app = require('mokit/app');
	var ProjectCategoryView = require('../views/project-category');
	var commonUtils = require('../common/utils');
	var Project = require('../models/Project');

	/**
	 * 社友录页面控制器
	 */
	return app.controller.create({
		isSetting: true,
		/**
		 * 默认action
		 */
		index: function(context) {
			var self = this;
			//清空返回处理队列
			commonUtils.backAction = [];
			Project.getCatList(function() {
				self.setView(new ProjectCategoryView({
					model: Project
				}));
			});

		},

		//查看某个分类下的列表
		viewCat: function(context, catCode) {
			var self = this;
			self.go(context, "/project/list/" + catCode, "/project/category");
		},

	});

});